﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CH03_02
{
    class CH03_02
    {
        static void Main(string[] args)
        {
            // 定义一个整数变量并赋值
            int day = 3;

            // 使用switch结构进行条件判断
            switch (day)
            {
                case 1:
                    Console.WriteLine("Today is Monday.");
                    break;
                case 2:
                    Console.WriteLine("Today is Tuesday.");
                    break;
                case 3:
                    Console.WriteLine("Today is Wednesday.");
                    break;
                case 4:
                    Console.WriteLine("Today is Thursday.");
                    break;
                case 5:
                    Console.WriteLine("Today is Friday.");
                    break;
                case 6:
                    Console.WriteLine("Today is Saturday.");
                    break;
                case 7:
                    Console.WriteLine("Today is Sunday.");
                    break;
                default:
                    Console.WriteLine("Invalid day.");
                    break;
            }

            // 等待用户输入以避免程序立即退出
            Console.WriteLine("Press any key to exit...");
            Console.ReadKey();
        }
    }
}
